package com.jml.装饰模式实现三级缓存.decorator;

/**
 * @author:jml
 * @date: 2019/9/9 14:06
 * @description：
 */

import com.jml.装饰模式实现三级缓存.component.ComponentCache;
import com.jml.装饰模式实现三级缓存.component.impl.OneLevelCacheComponent;

public abstract class AbstractDecorator implements ComponentCache {

    public ComponentCache baseCacheComponent;

    public AbstractDecorator(ComponentCache baseCacheComponent) {
        this.baseCacheComponent = baseCacheComponent;
    }

    @Override
    public Object getCache(String key) {
        return baseCacheComponent.getCache(key);
    }
}
